﻿jQuery(document).ready(function () {

    $(".widgets li .widget-inner").hover(function () {
        $(this).addClass('widget-inner-big');
    },
    function () {
        $(this).removeClass('widget-inner-big');
    });

    $('.jqueryui-themes a').wijtooltip();
    $('.premium-themes a').wijtooltip();


    $('.jqueryui-themes1 a').wijtooltip();
    $('.premium-themes1 a').wijtooltip();

    $('#wijcalendar').wijcalendar();

    $('#wijaccordion').wijaccordion({ header: 'h3', selectedIndex: 1 });

    $("#ipodmenu").wijmenu({
        orientation: "vertical",
        mode: "sliding"
    });


    $("#wijtabs").wijtabs();

    var testArray = [{
        label: 'c++',
        value: 'c++'
    }, {
        label: 'java',
        value: 'java'
    }, {
        label: 'php',
        value: 'php'
    }, {
        label: 'coldfusion',
        value: 'coldfusion'
    }, {
        label: 'javascript',
        value: 'javascript'
    }, {
        label: 'asp',
        value: 'asp'
    }, {
        label: 'ruby',
        value: 'ruby'
    }, {
        label: 'python',
        value: 'python'
    }, {
        label: 'c',
        value: 'c'
    }, {
        label: 'scala',
        value: 'scala'
    }, {
        label: 'groovy',
        value: 'groovy'
    }, {
        label: 'haskell',
        value: 'haskell'
    }, {
        label: 'perl',
        value: 'perl'
    }];
    var list = $("#list");
    var input = $('#testinput');
    list.wijlist({
        selected: function (event, ui) {
            var selectedItem = ui.item;
            var str = selectedItem.label;
            input.val(str);

        }
    });


    list.wijlist('setItems', testArray);
    list.wijlist('renderList');
    list.wijlist('refreshSuperPanel');
    input.bind("keydown.wijcombobox", function (event) {
        var keyCode = $.ui.keyCode;
        switch (event.keyCode) {
            case keyCode.UP:
                list.wijlist('previous', event);
                // prevent moving cursor to beginning of text field in some browsers
                event.preventDefault();
                break;
            case keyCode.DOWN:
                if (!list.is(':visible')) {
                    list.show();
                    return;
                }
                list.wijlist('next', event);
                // prevent moving cursor to end of text field in some browsers
                event.preventDefault();
                break;
            case keyCode.ENTER:
                event.preventDefault();
                list.wijlist('select', event);
                break;
            case keyCode.PAGE_UP:
                list.wijlist('previousPage');
                break;
            case keyCode.PAGE_DOWN:
                list.wijlist('nextPage');
                break;
            default:
                break;
        }
    });

    $(":input[type='text'],:input[type='password'],textarea").wijtextbox();
    $("#select1").wijdropdown();
    $(":input[type='radio']").wijradio();
    $(":input[type='checkbox']").wijcheckbox();
    $("#wijmo-button").button();

});